package cn.kgc.spring;


import cn.kgc.spring.service.TeacherService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {

    public static void main(String[] args) {

        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("config/spring-config.xml");
        TeacherService teacherService = classPathXmlApplicationContext.getBean("teacherService", TeacherService.class);

         // class cn.kgc.spring.service.impl.TeacherServiceImpl
         // class com.sun.proxy.$Proxy3
        System.out.println(teacherService.getClass());

        String s = teacherService.teachOnLine("Java");
        System.out.println("-------------------------");
        String s1 = teacherService.teachOffLine("HTML");


    }
}
